package tw.com.softleader.movie.app;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import tw.com.softleader.movie.service.MovieService;
import tw.com.softleader.movie.service.impl.MovieServiceImpl;

public class MovieApp {

	private static final Logger log = LoggerFactory.getLogger(MovieApp.class);
	
	public static void main(String[] args){
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext(new String[]{"spring-movie.xml"});
		MovieService movieService = applicationContext.getBean(MovieServiceImpl.class);
		log.debug("Movies Size = {}", movieService.getAll().size());
	}
}
